<script lang="ts" setup>
import {ref} from "vue";
import DataForm from "@/components/data-form/index.vue";


const dataFormRef = ref<InstanceType<typeof DataForm>>();

const forms = ref([
    {prop: 'id'},
    {prop: 'owner'},
    {prop: 'host', label: 'IP地址', required: true},
    {prop: 'port', label: '端口号', required: true},
    {prop: 'username', label: '帐号', required: true},
    {prop: 'password', label: '密码', required: true},
])

const open = (options: OpenFormConfig) => {
    dataFormRef.value?.open(options)
};

defineExpose({open})
</script>

<template>
    <data-form ref="dataFormRef" :forms="forms" description="会话" rule-prop="ssh"/>
</template>
